package com.mes.system.manager.iface;

import java.util.Date;
import java.util.List;

import com.mes.common.manager.iface.IBasicManager;
import com.mes.system.domain.Message;

public interface IMessageManager extends IBasicManager<Message> {

	public void sendMessages(List<Message> messages) throws Exception, Exception;

	public void sendMessage(Message message) throws Exception;

	public List<Message> getAllMessages(String parentMessageUid) throws Exception;

	/**
	 * 将某用户未读信息串成一条字符串
	 * 
	 * @param employeeId
	 * @return
	 * @throws Exception
	 */
	public List<Message> getUnReadMessagesByEmployeeId(String employeeId) throws Exception;

	public String getUnReadMessageTopicsByEmployeeId(String employeeId) throws Exception;

	public List<Message> getMessagesByEmployeeId(String employeeId) throws Exception;

	public List<Message> getSentMessagesByEmployeeId(String employeeId) throws Exception;

	public List<Message> getDraftMessagesByEmployeeId(String employeeId) throws Exception;

	public Boolean setMessagesRead(List<Message> messages) throws Exception, Exception;

	public Boolean saveMessagesToDraft(List<Message> messages) throws Exception;

	public void add(Message message) throws Exception;

	public void add(List<Message> messages) throws Exception;

	public void delete(List<Message> messages) throws Exception;

	public void delete(Message message) throws Exception;

	public void update(List<Message> messages) throws Exception;

	public void update(Message message) throws Exception;

	public List<Message> getMessagesByParentMessageUid(String parentMessageUid) throws Exception;

	public List<Message> getMessagesByMessageUid(String messageUid) throws Exception;

	public void sendMessagesFromDraft(List<Message> messageList) throws Exception;

	public List<Message> getDraftById(String messageUid) throws Exception;

	public void setMessageRead(Message message) throws Exception, Exception;

	public Boolean setMessageReadById(String messageUid) throws Exception;

	public List<Message> getUnReadMessagesByEmployeeIdAndTime(String employeeId, Date afterDate) throws Exception;

	public List<Message> getAllMessagesByEmployeeIdAndTime(String employeeId, Date afterDate) throws Exception;

}
